package com.netease.nie.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.netease.nie.model.RobGoodsInfoPeriod;

public interface RobGoodsInfoPeriodMapper {

	List<RobGoodsInfoPeriod> queryMaxPeriodRobGoodsInfoPeriodsByRobGoodsIds(
			@Param("robGoodsIds") List<Integer> robGoodsIds);

	List<RobGoodsInfoPeriod> queryRobGoodsInfoPublishedPeriodsByRobGoodsId(
			int robGoodsId);

	RobGoodsInfoPeriod queryRobGoodsInfoPeriodByDisplayPeriod(int displayPeriod);

	int updateRobGoodsPeriod(
			@Param("robGoodsInfoPeriod") RobGoodsInfoPeriod robGoodsInfoPeriod)
			throws Exception;

	List<RobGoodsInfoPeriod> queryUserRobGoodsInfoPeriodsByUserIdAndPublished(
			@Param("userId") long userId, @Param("published") int published,
			@Param("pageIndex") int pageIndex, @Param("pageSize") int pageSize);

	List<RobGoodsInfoPeriod> queryUserRobGoodsInfoPeriodsByUserId(
			@Param("userId") long userId, @Param("pageIndex") int pageIndex,
			@Param("pageSize") int pageSize);
}
